package cn.zindesign.system;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * @author lihui
 * Jan 8, 2012
 */
public class AppContext {
    private ApplicationContext context;
    private static AppContext app;

    private AppContext() {

        context = new ClassPathXmlApplicationContext(
                "classpath:applicationContext-*.xml");

    }

    public synchronized static AppContext getInstance() {
        if (app == null) {
            app = new AppContext();
        }
        return app;
    }

    public ApplicationContext getAppContext() {
        return context;
    }

}
